[WC-3471]: fix(image-web): migrate image source properties to allowUpload#2354
[WC-3471]: fix(image-web): migrate image source properties to allowUpload#2354yordan-st wants to merge 1 commit into
Conversation
AI Code Review
What was reviewed
Skipped (out of scope):
Findings
|
| function makeImageValue(overrides: Partial<ImageProp> = {}): ImageProp { | ||
| return { | ||
| status: ValueStatus.Available, | ||
| value: { uri: "https://example.com/a.png", name: "a.png" }, | ||
| readOnly: false, | ||
| validation: undefined, | ||
| setValidator: jest.fn(), | ||
| setValue: jest.fn(), | ||
| setThumbnailSize: jest.fn(), | ||
| ...overrides | ||
| } as ImageProp; | ||
| } |
There was a problem hiding this comment.
We should extent existing test utils instead
Pull request type
Bug fix (non-breaking change which fixes an issue)
Description
imageObjectanddefaultImageDynamicin the Image widget were declared astype="image"withoutallowUpload, which Mendix has deprecated —DynamicValue<WebImage>is removed in Mendix 12, and Studio Pro 11.8+ already shows a design-time deprecation warning for this pattern.This adds
allowUpload="true"to both properties and regenerates typings accordingly (EditableImageValue<WebImage>). The widget's read logic inImage.tsxis unchanged —EditableImageValueexposes the samestatus/value.urishape the widget already consumes, so this is a display-only migration with no new upload UI.marketplace.minimumMXVersionis bumped to11.12.0since the widget XML now requiresallowUploadsupport, which older Studio Pro versions cannot parse (verified: Studio Pro <11.8 fails to load the widget package with "The 'allowUpload' attribute is not declared").Manually verified in Studio Pro 11.12 that both Static and Dynamic image-source configuration remain available in the property editor after this change — existing apps using a static image are not broken.
Widget version is not bumped in this PR (bumped at release time per repo convention); this change will require a major bump (2.0.0) on release due to the
minimumMXVersionincrease.What should be covered while testing?